package com.example.intenttest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.annotation.Nullable;

public class MyActivity extends Activity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_image);

        ImageView imageView = findViewById(R.id.my_image);
        Intent intent = getIntent();
        int resource = intent.getIntExtra("imageResource", 0);
        imageView.setImageResource(resource);
    }
}
